/**
 * 
 */
package com.vision.core.cm.data;

import static com.vision.core.cm.data.ApplicationId.Admin;
import static com.vision.core.cm.data.Domain.COMPANY;
import static com.vision.core.cm.data.Domain.USER;
import static com.vision.core.cm.data.Domain.ROLE;
import static com.vision.core.cm.data.Domain.PROFILE;
import static com.vision.core.cm.data.Domain.ACTIVITY_LOG;

import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;

import com.vision.core.cm.db.data.Permission;

/**
 * @author Mark
 *
 */
public interface AdminPermissions {
	
	Permission CreateCompany = new Permission(Admin, COMPANY, "Create Company", "Allows creating of Companies.");
	Permission ViewCompany = new Permission(Admin, COMPANY, "View Company", "Allows viewing of Company information.");
	Permission UpdateCompany = new Permission(Admin, COMPANY, "Update Company", "Allows updating of Company information.");
	Permission DeleteCompany = new Permission(Admin, COMPANY, "Delete Company", "Allows deleting of Companies.");
	Set<Permission> AllForCompany = new HashSet<Permission>( Arrays.asList(CreateCompany, ViewCompany, UpdateCompany, DeleteCompany) );
	
	Permission CreateUser = new Permission(Admin, USER, "Create User", "Allows creating of Users.");
	Permission ViewUser = new Permission(Admin, USER, "View User", "Allows viewing of User information.");
	Permission UpdateUser = new Permission(Admin, USER, "Update User", "Allows updating of User information.");
	Permission DeleteUser = new Permission(Admin, USER, "Delete User", "Allows deleting of User information.");
	Set<Permission> AllForUser = new HashSet<Permission>( Arrays.asList(CreateUser, ViewUser, UpdateUser, DeleteUser) );
	
	Permission CreateRole = new Permission(Admin, ROLE, "Create Role", "Allows creating of Roles.");
	Permission ViewRole = new Permission(Admin, ROLE, "View Role", "Allows viewing of Role information.");
	Permission UpdateRole = new Permission(Admin, ROLE, "Update Role", "Allows updating of Role information.");
	Permission DeleteRole = new Permission(Admin, ROLE, "Delete Role", "Allows deleting of Roles.");
	Set<Permission> AllForRole = new HashSet<Permission>( Arrays.asList(CreateRole, ViewRole, UpdateRole, DeleteRole) );
	
	Permission ViewOwnProfile = new Permission(Admin, PROFILE, "View Own Profile", "Allows viewing of User's own profile information.");
	Permission UpdateOwnProfile = new Permission(Admin, PROFILE, "Update Own Profile", "Allows updating of User's own profile information.");
	Set<Permission> AllForOwnProfile = new HashSet<Permission>( Arrays.asList(ViewOwnProfile, UpdateOwnProfile) );
	
	Permission ViewActivityLogs = new Permission(Admin, ACTIVITY_LOG, "View Activity Logs", "Allows viewing of activity logs.");
	Set<Permission> AllForActivityLog = new HashSet<Permission>( Arrays.asList(ViewActivityLogs) );
	
	Permission[] All = {
		CreateCompany, ViewCompany, UpdateCompany, DeleteCompany,
		CreateUser, ViewUser, UpdateUser, DeleteUser,
		CreateRole, ViewRole, UpdateRole, DeleteRole,
		ViewOwnProfile, UpdateOwnProfile,
		ViewActivityLogs
	};

}
